<?php
namespace Announce\Controller;
use Think\Controller;
class IndexController extends Controller {

    public function get_announce(){
        $nav_model = D('Announce');
        $map['status'] = array('eq', 1);
        $list = $nav_model->where($map)->order('createtime desc')->select();
        return $list;
    }

    public function get_first_announce(){
        $model = D('Announce');
        $one = $model->order('createtime desc')->find();
        return $one;
    }
}